# -*- coding: utf-8 -*-

from django.conf.urls import url, include
from django.contrib import admin

from saltstack import key
from saltstack import minion
from saltstack import process
from saltstack import project
from saltstack import module
from saltstack import job
from saltstack import sysproc
from . import views
urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', views.index),
    url(r'^index', views.index),
    url(r'^dashboard', views.dashboard),
    url(r'^health', module.health),
    url(r'^key/(?P<action>query|accept|delete|reject|deny)$', key.action),

    url(r'^minion$', views.minion),
    url(r'^minion/query', minion.query), 

    url(r'^minion-list$', views.minionList),
    url(r'^minion-list/query/accepted', minion.queryAccepted), 
    url(r'^minion-list/query/pre', minion.queryPre), 
    url(r'^minion-list/query/denied', minion.queryDenied), 
    url(r'^minion-list/query/rejected', minion.queryRejected), 
    url(r'^minion-list/delete', minion.delete), 

    url(r'^execute', module.execute),
    url(r'^process$', views.process),
    url(r'^process/query$', process.query),

    url(r'^project$', views.project),
    url(r'^project/query$', project.query),
    url(r'^project/create$', project.create),
    url(r'^project/delete$', project.delete),
    url(r'^project/update$', project.update),

    url(r'^proc-register$', views.registerForm),
    url(r'^sysproc/mark$', sysproc.mark),
    url(r'^sysproc/query$', sysproc.query),
    url(r'^sysproc/delete$', sysproc.delete),

    url(r'^rmcmd$', views.rmcmd),       ## md, 注意前缀匹配的情况
    url(r'^job$', views.job),
    url(r'^sysproc$', views.sysproc),
    url(r'^job-detail$', views.jobDetail),


    url(r'^job/list$', job.list),
    url(r'^job/query$', job.query),
]
